
<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="tld" uri="/WEB-INF/tld/rei.tld" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@include file="/WEB-INF/include/admin-head.jsp" %>
<body>
<div class="ok-body">
	<!--form表单-->
	<form class="layui-form layui-form-pane ok-form">









              	<div class="layui-form-item">
			        <label class="layui-form-label">保单</label>
			        <div class="layui-input-block">
				        <input type="text" name="ordersId"  placeholder="请输入保单" autocomplete="off" class="layui-input" value="${model.id}" lay-verify="required">
			        </div>
		        </div>





              	<div class="layui-form-item">
			        <label class="layui-form-label">交警定责</label>

					<div class="layui-input-block">
						<textarea name="responsibility" readonly class="layui-textarea">${responsibility.responsibility}</textarea>
					</div>
		        </div>





              	<div class="layui-form-item">
			        <label class="layui-form-label">车损情况</label>

					<div class="layui-input-block">
						<textarea name="car" readonly class="layui-textarea">${responsibility.car}</textarea>
					</div>
		        </div>





              	<div class="layui-form-item">
			        <label class="layui-form-label">伤亡情况</label>

					<div class="layui-input-block">
						<textarea name="casualties" readonly class="layui-textarea">${responsibility.casualties}</textarea>
					</div>
		        </div>





              	<div class="layui-form-item">
			        <label class="layui-form-label">情况属实</label>

					<div class="layui-input-block">
						<textarea name="reals" readonly class="layui-textarea">${responsibility.reals}</textarea>
					</div>
		        </div>
		<div class="layui-form-item">
			<label class="layui-form-label">现场照片</label>
			<div class="layui-input-inline">
				<a href="/admin/attachment/image/${responsibility.image}">
					<img src="/admin/attachment/image/${responsibility.image}"  width="80px;">
				</a>

			</div>
		</div>


	</form>
</div>
<!--js逻辑-->
<script src="/static/lib/layui/layui.js"></script><script src="/static/js/jquery.min.js"></script>
<script>
	layui.use(["element", "form", "laydate", "okLayer", "okUtils"], function () {
		let form = layui.form;
		let laydate = layui.laydate;
		let okLayer = layui.okLayer;
		let okUtils = layui.okUtils;
		okLoading.close();














		form.verify({
			time: [/^((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))(\s(([01]\d{1})|(2[0123])):([0-5]\d):([0-5]\d))?$/, '日期格式不正确']
		});

		form.on("submit(add)", function (data) {
			$.post("/admin/responsibility/save",data.field,function (result) {
				if (result.code == 0) {
					layer.alert("成功", {icon: 6}, function () {
						// 获得frame索引
						var index = parent.layer.getFrameIndex(window.name);
						//关闭当前frame
						parent.layer.close(index);
						window.parent.location.reload();//刷新父页面
					});
				} else {
					layer.alert("失败", {icon: 5});
				}
			})
		});
	});
</script>
</body>
</html>


